# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AlertCenter.V1beta1.Model.AbuseDetected do
  @moduledoc """
  A generic alert for abusive user activity occurring with a customer.

  ## Attributes

  *   `additionalDetails` (*type:* `GoogleApi.AlertCenter.V1beta1.Model.EntityList.t`, *default:* `nil`) - List of abusive users/entities to be displayed in a table in the alert.
  *   `product` (*type:* `String.t`, *default:* `nil`) - Product that the abuse is originating from.
  *   `subAlertId` (*type:* `String.t`, *default:* `nil`) - Unique identifier of each sub alert that is onboarded.
  *   `variationType` (*type:* `String.t`, *default:* `nil`) - Variation of AbuseDetected alerts. The variation_type determines the texts displayed the alert details. This differs from sub_alert_id because each sub alert can have multiple variation_types, representing different stages of the alert.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalDetails => GoogleApi.AlertCenter.V1beta1.Model.EntityList.t() | nil,
          :product => String.t() | nil,
          :subAlertId => String.t() | nil,
          :variationType => String.t() | nil
        }

  field(:additionalDetails, as: GoogleApi.AlertCenter.V1beta1.Model.EntityList)
  field(:product)
  field(:subAlertId)
  field(:variationType)
end

defimpl Poison.Decoder, for: GoogleApi.AlertCenter.V1beta1.Model.AbuseDetected do
  def decode(value, options) do
    GoogleApi.AlertCenter.V1beta1.Model.AbuseDetected.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AlertCenter.V1beta1.Model.AbuseDetected do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
